package com.example.Fragment;

import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.example.Base.BaseFragment;
import com.example.activity.FindDetailActivity;
import com.example.activity.Test2Activity;
import com.example.activity.TrackDetailActivity;
import com.example.administrator.olddoctor.MainActivity;
import com.example.administrator.olddoctor.R;


/**
 * 追踪
 */
public class TrackFragment  extends BaseFragment implements View.OnClickListener{


    private Context context;
    private View view;

    private LinearLayout tv_track0,tv_track1,tv_track2,tv_track3,tv_track4;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        context = MainActivity.allThis;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        this.onCreate(savedInstanceState);
        view = inflater.inflate(R.layout.fragment_track, container, false);


        tv_track0 = (LinearLayout) view.findViewById(R.id.tv_track0);
        tv_track1 = (LinearLayout) view.findViewById(R.id.tv_track1);
        tv_track2 = (LinearLayout) view.findViewById(R.id.tv_track2);
        tv_track3 = (LinearLayout) view.findViewById(R.id.tv_track3);
        tv_track4 = (LinearLayout) view.findViewById(R.id.tv_track4);

        tv_track0.setOnClickListener(this);
        tv_track1.setOnClickListener(this);
        tv_track2.setOnClickListener(this);
        tv_track3.setOnClickListener(this);
        tv_track4.setOnClickListener(this);
        return view;
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.tv_track0:
                startActivity(new Intent(getActivity(), Test2Activity.class));
                break;

            case R.id.tv_track1:
                startActivity(new Intent(getActivity(), Test2Activity.class));
                break;
            case R.id.tv_track2:
                startActivity(new Intent(getActivity(), Test2Activity.class));
                break;
            case R.id.tv_track3:
                startActivity(new Intent(getActivity(), Test2Activity.class));
                break;
            case R.id.tv_track4:
                startActivity(new Intent(getActivity(), Test2Activity.class));
                break;
        }
    }

}
